import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';

export const columns: BasicColumn[] = [
    {
    title: '策略id',
    dataIndex: 'strategyId'
   },
   {
    title: '名称',
    dataIndex: 'name'
   },
   {
    title: '空间',
    dataIndex: 'spaceGuids'
   },
   {
    title: '设备',
    dataIndex: 'deviceGuids'
   },
   {
    title: '点位',
    dataIndex: 'pointGuids'
   },
   {
    title: '策略模式',
    dataIndex: 'mode'
   },
   {
    title: '删除状态',
    dataIndex: 'delFlag'
   },
];

export const searchFormSchema: FormSchema[] = [
 {
    label: '策略id',
    field: 'strategyId',
    component: 'InputNumber'
  },
 {
    label: '名称',
    field: 'name',
    component: 'Input'
  },
];

export const formSchema: FormSchema[] = [
  // TODO 主键隐藏字段，目前写死为ID
  {label: '', field: 'id', component: 'Input', show: false},
  {
    label: '策略id',
    field: 'strategyId',
    component: 'InputNumber',
  },
  {
    label: '名称',
    field: 'name',
    component: 'Input',
  },
  {
    label: '空间',
    field: 'spaceGuids',
    component: 'Input',
  },
  {
    label: '设备',
    field: 'deviceGuids',
    component: 'Input',
  },
  {
    label: '点位',
    field: 'pointGuids',
    component: 'Input',
  },
  {
    label: '策略模式',
    field: 'mode',
    component: 'Input',
  },
  {
    label: '删除状态',
    field: 'delFlag',
    component: 'InputNumber',
  },
];
